<?php   $this->load->view('includes/header'); ?>
<div class="container">
    <div class="row">
								<div class="col-md-9">
												<h1>Panel de Control <small>Listado de Idiomas</small></h1>
												<hr>
												<?php	if	(isset($error)	&&	$error):	?>
																<div class="alert alert-info alert-dismissable">
																				<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
																				<?php
																				if	(isset($msg)	&&	$msg	!=	' ')	{
																								echo	$msg;
																				}
																				?>
																</div>

												<?php	endif	?>
												<table class="table table-bordered table-hover tablesorter">
                <thead>
                  <tr>
                    <th>Codigo <i class="fa fa-sort"></i></th>
																				<th>Nombre <i class="fa fa-sort"></i></th>
                    	<th width="16px"><a data-toggle="modal" href="#myModal" ><i class="fa fa-plus-square-o"></i></a></th>
                  </tr>
                </thead>
                <tbody>
                  <?php foreach($idiomas as $idioma):?>
                    <tr>
                      <td><?php echo $idioma['cod_idiomas']; ?></td>
																						<td><?php echo $idioma['nombre']; ?></td>
                      <td> 
                        <a href="/idiomas/eliminar/<?php echo $idioma['cod_idiomas']; ?>/" title="Eliminar administradores"><i class="fa fa-trash-o"></i></a>
                      </td>
                    </tr>
                  <?php endforeach; ?>
                </tbody>
              </table>
								</div>
    </div>
</div>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
								<div class="modal-content">
												<div class="modal-header">
																<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
																<h4 class="modal-title" id="myModalLabel">Agregar Pais</h4>
												</div>
												<form role="form" class="form_add" id="form_add_artista" action="/idiomas/insertar" method="post">
																<div class="modal-body">
																				<div class="row">
																								<div class="form-group col-md-3">
																												<label>CODIGO</label>
																												<input class="form-control" name="cod_idiomas" > 
																								</div>
																								<div class="form-group col-md-9">
																												<label>Nombre</label>
																												<input type="text" class="form-control input_width10" name="nombre"> 
																								</div>
																				</div>
																</div>
																<div class="modal-footer">
																				<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
																				<button type="submit" class="btn btn-primary">Añadir</button>
																</div>
												</form>
								</div>
    </div>
</div>				

<?php   $this->load->view('includes/footer'); ?>